{extend name="common/common" /}

{block name="content"}
<el-card class="box-card">
	<div slot="header">
		<span class="span-primary"><i class="el-icon-search"></i></span>
		电子商务进农村资金使用项目列表
	</div>
	<el-form :inline="true" class="search-table-form">
		<el-form-item>
			<el-select v-model="sea.seaDepart" placeholder="请选择地区">
				{volist name="departs" id="v"}
				<el-option label="{$v.name}" value="{$v.id}"></el-option>
				{/volist}
			</el-select>
		</el-form-item>
		<el-form-item>
			<el-input placeholder="请输入承办单位" clearable v-model="sea.seaEnterName"></el-input>
		</el-form-item>
		<el-form-item>
			<el-button type="info" plain @click="getTable">查询</el-button>
		</el-form-item>
	</el-form>
	<el-table :data="tableData" stripe="true" border :empty-text="empty_text">
		<el-table-column align="center" prop="depart_name" label="填报单位"></el-table-column>
		<el-table-column align="center" prop="enter_name" label="企业名称"></el-table-column>
		<el-table-column align="center" prop="project_type" label="项目类型"></el-table-column>
		<el-table-column align="center" prop="project_name" label="项目名称"></el-table-column>
		<el-table-column align="center" prop="all" label="已拨付金额（万元）"></el-table-column>
		<el-table-column align="center" prop="un" label="未拨付金额（万元）"></el-table-column>
		<el-table-column align="center" prop="money_ratio" label="资金占比（%）"></el-table-column>
		<el-table-column align="center" prop="link_man" label="填报人"></el-table-column>
		<el-table-column align="center" prop="link_type" label="联系电话"></el-table-column>
	</el-table>
</el-card>
{/block}

{block name="script"}
<script type="text/javascript">
var main =  new Vue({
	el:"#main",
	data:{
		loading:false,
		sea:{seaDepart:"",seaEnterName:"",},
		tableData:'',
		empty_text:"请输入查询条件"
	},
	methods:{
		getTable(){
			this.loading=true;
			var param = this.sea;
			$.post('./projectList',param,function(res){
				main.loading=false;
				if(res.code == 1){
					main.$message({message: res.msg,type:'success'});
					main.tableData = res.data.rows;
					main.empty_text = "没有找到匹配数据";
				}else{
					main.$notify.error({title: '失败',message: res.msg,});
					main.tableData = "";
					main.empty_text = res.msg;
				}
			})
		}
	}
})
</script>
{/block}
